package day09.doublecolon;

public class ConstructorTest {
    public static Student getStudentByName(String name,ConstructorRef ref){
        return ref.getStudentByName(name);
    }
    public static void main(String[] args) {
//        使用lambda表达式
//        Student student=getStudentByName("tom",name->new Student (name));
//        使用双冒号
        Student student = getStudentByName("jack",Student::new);
        System.out.println(student);
    }
}
